package com.abvnet.project.water.api.web;

import com.abvnet.framework.web.controller.BaseController;
import com.abvnet.framework.web.domain.AjaxResult;
import com.abvnet.project.water.sewage.service.ISewageFlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/sewage/flow")
public class ApiSewageFlowController extends BaseController {

    @Autowired
    private ISewageFlowService sewageFlowService;

    @GetMapping("/list")
    public AjaxResult list(@RequestParam("projectId") Long projectId) {
        return AjaxResult.success(sewageFlowService.selectSewageFlowListByProjectId(projectId));
    }
}